// git push 命令

const { exec } = require("child_process");
const argList = process.argv.slice(2);

(function () {
    if (!argList[0]) {
        return;
    }
    const instruc = `git add . && git commit -m '${argList[0]}' && git push origin`;
    console.log("执行命令：" + instruc + '\n');

    exec(instruc, (error, stdout, stderr) => {
        if (!error) {
            console.log("success: ", stdout, stderr);
        } else {
            console.log("error: ", error);
        }
    });
})();
